package com.woniu.supermarket.vo;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.woniu.supermarket.entity.Purchase;
import com.woniu.supermarket.entity.PurchaseDetail;
import com.woniu.supermarket.entity.Supplier;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@ApiModel(description = "封装采购单信息")
@Data
public class PurchaseVo {

    @ApiModelProperty(value = "id")
    private Integer id;

    @ApiModelProperty(value = "采购单号")
    private String purchaseNumber;

    @ApiModelProperty(value = "供应商对象")
    private Supplier supplier;

    @ApiModelProperty(value = "采购商品总价")
    private BigDecimal total;

    @ApiModelProperty(value = "采购人员")
    private String purchaseStaff;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",
                timezone = "GMT+8"
    )
    @ApiModelProperty(value = "采购日期")
    private Date purchaseDate;

    @ApiModelProperty(value = "状态 有无审核")
    private Integer status;

    @ApiModelProperty(value = "采购单详情集合")
    private List<PurchaseDetailVo> purchaseDetailList;
}
